package com.lgh.springframework.beans.factory.config;

import com.lgh.springframework.beans.BeansException;
import com.lgh.springframework.beans.factory.BeanFactory;

/**
 * ******************************************************
 *
 * @author liugh9
 * @version 1.0
 * @classname AutowireCapableBeanFactory
 * @description
 * @date 2023/02/25 1:03
 * <p>
 * ******************************************************
 */
public interface AutowireCapableBeanFactory extends BeanFactory {

    /**
     * 执行 BeanPostProcessors 接口实现类的 postProcessBeforeInitialization 方法
     *
     * @param existingBean
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object applyBeanPostProcessorsBeforeInitialization(Object existingBean, String beanName) throws BeansException;

    /**
     * 执行 BeanPostProcessors 接口实现类的 postProcessorsAfterInitialization 方法
     *
     * @param existingBean
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object applyBeanPostProcessorsAfterInitialization(Object existingBean, String beanName) throws BeansException;


}
